#include<iostream>
using namespace std;
int main(){
    int n,max=0,height[100],m;
    cin>>n;
    while(n){
        cin>>m;
        for (int i = 0; i < m; i++)
        {
            cin>>height[i];
            if(max<height[i]) max=height[i];
        }
        cout<<height<<endl;
        n--;
    }
}